{load header}
<!--/H-->
    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
            
            <!-- nav -->
                        <!-- nav -->
            

            
	<div class="main-title">
        <h2>账户管理</h2>
    </div>
	<div class="cf">
		<a class="btn" href="{eval site_url('finance/index')}">所有记录</a>
                <!--
		<a class="btn" href="{eval site_url('finance/index')}?type=unusual">异常记录</a>
		<a class="btn ajax-get" href="{eval url('finance/batch_update_pnr_balance')}">批处理异常</a>
                -->
		<!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">
				
				<input type="text" name="key" class="search-input" value="{$keyword}" placeholder="用户ID/用户名">
				<a class="sch-btn" href="javascript:;" id="search" url=""><i class="btn-search"></i></a>
			</div>
                    <!--
			<div class="btn-group-click adv-sch-pannel fl">
                <button class="btn">高 级<i class="btn-arrowdown"></i></button>
                <div class="dropdown cf">
                	<div class="row">
                		<label>余额范围：</label>
                		<input type="text" id="balance-min" name="balance-min" class="text input-2x" value="" placeholder="最少余额" /> -                		
                        <div class="input-append date" id="datetimepicker"  style="display:inline-block">
                            <input type="text" id="balance-max" name="balance-max" class="text input-2x" value="" placeholder="最大余额" />
                            <span class="add-on"><i class="icon-th"></i></span>
                        </div>
                	</div>
                </div>
            </div>
                    -->
		</div>
	    </div>
    <div class="data-table">
        <div class="data-table table-striped">
			<!-----table----->
			<table class="table table-hover">
				<thead>
				<tr>
					<th>用户ID</th>
					<th>用户名</th>
					<th>溜溜币总额</th>
					<th>可用金额</th>
					<!--<th>冻结金额</th>-->
					<th>总支出额</th>
					<th>积分当前总数量</th>
					<th>可用数量</th>
					<!--<th>冻结数量</th>-->
					<th>总支出数量</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				  <!--{loop $list $k1 $val}-->
					<tr>
						<td>{$val['user_id']}</td>
						<td title="{$val['user_id']}">{$val['username']}</td>
						<td>{$val['total']}</td>
						<td>{$val['balance']}</td>
						<!--<td>{$val['frost']}</td>-->
						<td>{$val['expend']}</td>
						<td>{$val['experience']}</td>
                                                <td>{$val['experience_balance']}</td>
                                                <!--<td>{$val['experience_frost']}</td>-->
                                                <td>{$val['experience_expend']}</td>
						<td ><a href="{eval url('finance/finance1')}?uname={$val['username']}">溜溜币明细</a>&nbsp;&nbsp; <a href="{eval url('finance/experience')}?uname={$val['username']}" >积分明细</a></td>
					</tr>
				<!--{/loop}-->

				</tbody>
				<tfoot>
				<tr>
					<th>总计</th>
					<th>--</th>
					<th>{$T_total['total']}</th>
					<th>{$T_total['balance']}</th>
					<th>{$T_total['frost']}</th>
					<th>{$T_total['expend']}</th>
					<th>{$T_total['experience']}</th>
                                        <th>{$T_total['experience_balance']}</th>
					<th>{$T_total['experience_frost']}</th>
                                        <th>{$T_total['experience_expend']}</th>
					<th>--</th>
				</tr>
				</tfoot>
			</table>
			
			<!-----/table----->
			<!-- 分页 -->
				<div class="page">
					<div>
					{$showpage}
					<span class="rows">共 {$Total} 条记录</span>
					<a target ="_blank;" href="{eval echo site_url('finance/balance_export')}?{eval echo $_SERVER['QUERY_STRING'];}" >导出结果</a>
					</div>
				</div>
		</div>
    </div>
	
	
			</div>
	</div>
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
		//var status = $("#sch-sort-txt").attr("data");
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
		/*
		if(status != ''){
			query += '&st=' + status + "&" + query;
        }
		*/
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});

	
    //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    })
    
})
</script>
<!--F-->{load footer}